<!DOCTYPE html PUBLIC
    "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Error <?php echo $data['code']; ?></title>

    <style type="text/css">
        /*<![CDATA[*/
        body {
            font-family: "Verdana";
            font-weight: normal;
            color: black;
            background-color: white;
            padding: 10px;
            margin: 0;
        }

        h1 {
            font-family: "Verdana";
            font-weight: normal;
            font-size: 16pt;
            color: red;
            margin: 0;
        }

        h2 {
            font-family: "Verdana";
            font-weight: normal;
            font-size: 14pt;
            color: maroon
        }

        h3 {
            font-family: "Verdana";
            font-weight: bold;
            font-size: 11pt
        }

        p {
            font-family: "Verdana";
            font-size: 9pt;
        }

        pre {
            font-family: "Lucida Console";
            font-size: 10pt;
        }

        em {
            font-weight: bold;
            font-style: normal;
        }

        .version {
            color: gray;
            font-size: 8pt;
            border-top: 1px solid #aaaaaa;
        }

        .message {
            color: maroon;
            padding: 10px 0;
        }

        .source {
            font-family: "Consolas, Courier, Lucida Console";
            font-weight: normal;
            background-color: #ffffee;
            padding: 10px
        }

        .error {
            background-color: #ffeeee;
        }

        #extra_params {
            background-color: #fee;
            border: 1px solid #ddd;
            padding: 10px;
            margin-bottom: 10px;
        }

        #extra_params h3 {
            margin: 0;
        }

        #extra_params ul {
            margin-top: 0;
            margin-bottom: 0;
        }

        #error_file {
            margin: 0;
            padding: 10px;
            background-color: #dea3ac
        }

        .error_info {
            border: 1px solid #dea3ac;
            margin: 10px 0;
        }

        /*]]>*/
        /*]]>*/
    </style>
</head>

<body>
<h1>PHP Error</h1>
<div id="extra_params">
    <h3>错误信息:</h3>
    <div class="message"><?php echo nl2br(CHtml::encode($message)); ?></div>
    <h3>附加信息:</h3>
    <ul>
        <?php
        //ua refer等
        echo '<li><em>';
        echo 'UA:';
        echo '</em>';
        echo $_SERVER['HTTP_USER_AGENT'];
        echo '</li>';

        echo '<li><em>';
        echo 'Refer:';
        echo '</em>';
        echo $_SERVER['HTTP_REFERER'];
        echo '</li>';
        ?>
        <?php foreach ($params as $key => $value): ?>
            <li><em><?php echo $key; ?></em>:
                <?php
                if (is_array($value)) {
                    echo "<ul>";
                    foreach ($value as $k => $v) {
                        echo "<li><em>$k</em>: $v</li>";
                    }
                    echo "</ul>";
                } else {
                    echo $value;
                }
                ?></li>
        <?php endforeach; ?>
    </ul>
</div>
<div class="error_info">
<pre id="error_file">
<?php echo "$file($line)"; ?>
</pre>
    <pre class="source">
<?php echo $traceString; ?>
</pre>
</div>

<div class="version">Notified by Exception Watcher <?php echo date('Y-m-d H:i:s', time()); ?></div>
</body>
</html>

